﻿@model Cdn.Blogger.Models.CDNSetting

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="wpanel" data-title="Please login with content provider credentials...">

    @using (Html.BeginForm("Login", "Magazine", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <div class="form">

            <div class="form-group">
                <label class="col-sm-2 control-label">Current User : </label>
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.User, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.User)
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">User Name: </label>
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.Subscription, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Subscription)
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">User Name: </label>
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.UserName, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.UserName)
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">Password: </label>
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.Password, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Password)
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-2 control-label">URL: </label>
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.ContentUri, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.ContentUri)
                </div>
            </div>

            <div class="form-actions text-right">
                <button type="submit" id="submit" class="btn btn-primary">Submit</button>
            </div>
        </div>
    }

</div>

<script type="text/javascript">
    $(function () {
        $("#Password").val('@Model.Password');
        $(function () {
            window.setTimeout(function () {

                $("#submit").trigger("click");
            }, 1000);
        });
    });

</script>
